Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the promise-caching in the PDFDocument.fieldObjects getter #18871

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 8, 2024

  • Improve the promise-caching in the PDFDocument.fieldObjects getter

    After PR Fix missing annotation parent in using the one from the Fields entry #18845 we're accessing this getter more, hence it seems like a good idea to ensure that the initial formInfo access is covered as well.
    While unlikely to be a problem in practice, at least theoretically that data may not be available and the code in fieldObjects could thus currently be unintentionally invoked more than once.

  • Reduce duplication in the PDFDocument.calculationOrderIds getter

Smaller diff with https://github.com/mozilla/pdf.js/pull/18871/files?w=1

After PR 18845 we're accessing this getter more, hence it seems like a good idea to ensure that the initial `formInfo` access is covered as well.
While unlikely to be a problem in practice, at least theoretically that data may not be available and the code in `fieldObjects` could thus currently be *unintentionally* invoked more than once.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/0cd2082ec6dbc40/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1a5a5857f47eac2/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/1a5a5857f47eac2/output.txt

Total script time: 31.32 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 22
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/1a5a5857f47eac2/reftest-analyzer.html#web=eq.log

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/0cd2082ec6dbc40/output.txt

Total script time: 47.16 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 3

Image differences available at: http://54.193.163.58:8877/0cd2082ec6dbc40/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 1269c6a into mozilla:master Oct 8, 2024
8 checks passed
@timvandermeij
Copy link
Contributor

Thank you!

@Snuffleupagus Snuffleupagus deleted the PDFDocument-more-ensure branch October 9, 2024 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants